<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title th:text="${session.title}">123</title>
    <link th:replace="common/header"/>
    <link rel="stylesheet" th:href="@{/css/ace-skins.min.css}"/>
    <link th:replace="common/tip"/>
</head>
<body class="navbar-fixed">
<div th:replace="common/top"></div>
<div class="container-fluid main_bg" id="main-container">
    <a id="menu-toggler" href="#"><span></span></a>
    <div th:replace="common/menu"></div>
    <div id="main-content" class="clearfix">
        <div id="page-content" class="clearfix">
            <div th:replace="common/title"></div>
            <h3 class="header smaller lighter blue"><em class="icon-plus"></em>我要解约球员</h3>
            <form class="form-horizontal" th:object="${footXf}" method="post" th:action="@{/hy/footXf/add.do}"
                  name="form"
                  th:if="${session.footUser.qx.text == '会员' || session.footUser.qx.text == 'VIP1' || session.footUser.qx.text == 'VIP2' || session.footUser.qx.text == 'VIP3'}">
                <input type="hidden" name="xycs" th:field="*{xycs}" id="xycs"/>
                <input type="hidden" id="qyId" name="qyId" th:field="*{qyId}"/>
                <div class="row-fluid">
                    <div class="span8">
                        <table id="table_bug_report" class="table table-hover">
                            <thead>
                            <tr>
                                <th style="width:40px;">位置</th>
                                <th>球员名称</th>
                                <th style="width:80px;">等级</th>
                                <th class="hidden-480" style="width:110px;">国籍</th>
                                <th class="hidden-480" style="width:40px;">年龄</th>
                                <th class="hidden-480" style="width:40px;">评分</th>
                                <th class="hidden-480" style="width:60px;">球员身价</th>
                                <th class="hidden-480">球员状态</th>
                                <th class="hidden-480">剩余场次</th>
                                <th class="hidden-480">是否为主力球员</th>
                                <th class="hidden-480">战斗力</th>
                                <th class="hidden-480">战力等级</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr th:each="t:${footPersonList}">
                                <td th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\','  + ${t.fupId} + ')'">
                                    <img alt="" src="" th:src="@{/images/foot/gk.png}" th:if="${t.wzbm == 'GK'}"/>
                                    <img alt="" src="" th:src="@{/images/foot/sw.png}" th:if="${t.wzbm == 'SW'}"/>
                                    <img alt="" src="" th:src="@{/images/foot/cb.png}" th:if="${t.wzbm == 'CB'}"/>
                                    <img alt="" src="" th:src="@{/images/foot/lb.png}" th:if="${t.wzbm == 'LB'}"/>
                                    <img alt="" src="" th:src="@{/images/foot/rb.png}" th:if="${t.wzbm == 'RB'}"/>
                                    <img alt="" src="" th:src="@{/images/foot/dmf.png}" th:if="${t.wzbm == 'DMF'}"/>
                                    <img alt="" src="" th:src="@{/images/foot/cmf.png}" th:if="${t.wzbm == 'CMF'}"/>
                                    <img alt="" src="" th:src="@{/images/foot/lmf.png}" th:if="${t.wzbm == 'LMF'}"/>
                                    <img alt="" src="" th:src="@{/images/foot/rmf.png}" th:if="${t.wzbm == 'RMF'}"/>
                                    <img alt="" src="" th:src="@{/images/foot/lwf.png}" th:if="${t.wzbm == 'LWF'}"/>
                                    <img alt="" src="" th:src="@{/images/foot/rwf.png}" th:if="${t.wzbm == 'RWF'}"/>
                                    <img alt="" src="" th:src="@{/images/foot/amf.png}" th:if="${t.wzbm == 'AMF'}"/>
                                    <img alt="" src="" th:src="@{/images/foot/ss.png}" th:if="${t.wzbm == 'SS'}"/>
                                    <img alt="" src="" th:src="@{/images/foot/cf.png}" th:if="${t.wzbm == 'CF'}"/>
                                </td>
                                <td th:if="${t.qydj == '顶级球星'}"
                                    th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\','  + ${t.fupId} + ')'">
                                    <span style="color: orange; font-weight: bold"
                                          th:text="${t.yw + (t.name == null ? '' : '(' + t.name + ')')}">123</span></td>
                                <td th:if="${t.qydj == '顶级球星'}"
                                    th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\','  + ${t.fupId} + ')'">
                                    <em class="icon-star text-warning"></em><em class="icon-star text-warning"></em><em
                                        class="icon-star text-warning"></em><em class="icon-star text-warning"></em><em
                                        class="icon-star text-warning"></em></td>
                                <td th:if="${t.qydj == '超级球星'}"
                                    th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\','  + ${t.fupId} + ')'">
                                    <span style="color: purple; font-weight: bold"
                                          th:text="${t.yw + (t.name == null ? '' : '(' + t.name + ')')}">123</span></td>
                                <td th:if="${t.qydj == '超级球星'}"
                                    th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\','  + ${t.fupId} + ')'">
                                    <em class="icon-star text-warning"></em><em class="icon-star text-warning"></em><em
                                        class="icon-star text-warning"></em><em class="icon-star text-warning"></em>
                                </td>
                                <td th:if="${t.qydj == '洲际球星'}"
                                    th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\','  + ${t.fupId} + ')'">
                                    <span style="color: blue; font-weight: bold" th:text="${t.yw + (t.name == null ? '' : '(' + t.name + ')')}">123</span>
                                </td>
                                <td th:if="${t.qydj == '洲际球星'}"
                                    th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\','  + ${t.fupId} + ')'">
                                    <em class="icon-star text-warning"></em><em class="icon-star text-warning"></em><em
                                        class="icon-star text-warning"></em></td>
                                <td th:if="${t.qydj == '普通球星'}"
                                    th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\','  + ${t.fupId} + ')'">
                                    <span style="color: #9dfe5c; font-weight: bold"
                                          th:text="${t.yw + (t.name == null ? '' : '(' + t.name + ')')}">123</span></td>
                                <td th:if="${t.qydj == '普通球星'}"
                                    th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\','  + ${t.fupId} + ')'">
                                    <em class="icon-star text-warning"></em><em class="icon-star text-warning"></em>
                                </td>
                                <td th:if="${t.qydj == '大众/白人'}"
                                    th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\','  + ${t.fupId} + ')'">
                                    <span style="color: white; font-weight: bold"
                                          th:text="${t.yw + (t.name == null ? '' : '(' + t.name + ')')}">123</span></td>
                                <td th:if="${t.qydj == '大众/白人'}"
                                    th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\','  + ${t.fupId} + ')'">
                                    <em class="icon-star text-warning"></em></td>
                                <td class="hidden-480"
                                    th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\','  + ${t.fupId} + ')'">
                                    <span th:if="${null != t.gjUrl}"><img th:src="@{'/' + ${t.gjUrl}}" src="" alt=""
                                                                          style="max-height:20px;"><span
                                            th:text="${t.gjName}">123</span></span>
                                    <span th:if="${null == t.gjUrl}"><img th:src="@{/images/unknow.png}" src="" alt=""
                                                                          style="max-height:20px;"><span
                                            th:text="${null == t.gjName ? '未知' : t.gjName}">123</span></span>
                                </td>
                                <td class="hidden-480"
                                    th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\','  + ${t.fupId} + ')'"
                                    th:text="${t.nl}">123
                                </td>
                                <td class="hidden-480"
                                    th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\','  + ${t.fupId} + ')'"
                                    th:text="${t.pf}">123
                                </td>
                                <td class="hidden-480"
                                    th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\','  + ${t.fupId} + ')'"
                                    th:text="${#numbers.formatDecimal(t.qysj, 0, 0)}">123
                                </td>
                                <td class="hidden-480"
                                    th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\','  + ${t.fupId} + ')'">
                                    <img alt="" th:src="@{/images/foot/xy.png}" src="" style="height:20px;"
                                         th:if="${t.xycs < 10}"/>
                                    <img alt="" th:src="@{/images/foot/gp.png}" src="" style="height:20px;"
                                         th:if="${t.gpzt == 1}"/>
                                </td>
                                <td class="hidden-480"
                                    th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\','  + ${t.fupId} + ')'"
                                    th:text="${t.xycs}">123
                                </td>
                                <td class="hidden-480"
                                    th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\','  + ${t.fupId} + ')'"
                                    th:text="${t.main ? '是' : '否'}">123
                                </td>
                                <td class="hidden-480"
                                    th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\','  + ${t.fupId} + ')'"
                                    th:text="${t.power}">123
                                </td>
                                <td class="hidden-480"
                                    th:onclick="'javascript:changePerson(' + ${t.id} + ',\'' + ${t.name} + '\',\'' + ${t.yw} + '\',\'' + ${t.zpUrl} + '\','  + ${t.fupId} + ')'">
                                    <span style="font-weight: bold; color: white;" th:if="${t.upTimes == 1}">1级</span>
                                    <span style="font-weight: bold; color: #9dfe5c;" th:if="${t.upTimes == 2}">2级</span>
                                    <span style="font-weight: bold; color: blue;" th:if="${t.upTimes == 3}">3级</span>
                                    <span style="font-weight: bold; color: purple;" th:if="${t.upTimes == 4}">4级</span>
                                    <span style="font-weight: bold; color: orange;" th:if="${t.upTimes == 5}">5级</span>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="span4 table_border">
                        <div class="row-fluid">
                            <h4 class="header smaller lighter blue"><em class="icon-plus"></em>解约球员</h4>
                        </div>
                        <div class="row-fluid">
                            <div class="span5">&nbsp;</div>
                            <div class="span2">
                                <div class="control-group">
                                    <img th:src="@{/images/null.jpg}" src="" alt="" id="imgXf"/>
                                </div>
                            </div>
                            <div class="span5">&nbsp;</div>
                        </div>
                        <div class="row-fluid">
                            <!--PAGE CONTENT BEGINS HERE-->
                            <div class="span6">
                                <div class="control-group">
                                    <label class="control-label" for="qyId">解约球员:</label>
                                    <div class="controls">
                                        <input type="hidden" id="fupId" name="fupId" th:field="*{fupId}">
                                        <input type="text" name="name" id="name" class="input_fix" placeholder="解约球员"
                                               readonly="readonly"/>
                                    </div>
                                </div>
                            </div>
                            <div class="span6">
                                <span style="color:red" th:if="${#fields.hasErrors('qyId')}" th:errors="*{qyId}">Name Error</span>
                            </div>
                        </div>
                        <div class="row-fluid">
                            <div class="span6">
                                <div class="control-group">
                                    <label class="control-label" for="xfsj">解约时间:<span
                                            style="color:red">*</span></label>
                                    <div class="controls">
                                        <span id="xfsj" th:text="${#dates.format(footXf.xfsj)}">123</span>
                                    </div>
                                </div>
                            </div>
                            <div class="span6">
                                <span style="color:red" th:if="${#fields.hasErrors('xfsj')}" th:errors="*{xfsj}">Name Error</span>
                            </div>
                        </div>
                        <div class="row-fluid">
                            <div class="text-center span12">
                                <button class="btn btn-primary" type="submit"><em class="icon-save"></em>解约</button>
                                <button class="btn btn-danger" type="reset"><em class="icon-remove"></em>取消</button>
                                <a class="btn" type="button" th:href="@{/hy/footClub/viewList}"><em
                                        class="icon-arrow-left"></em>我的球队</a>
                                <a class="btn" type="button" th:href="@{/index}"><em
                                        class="icon-arrow-left"></em>返回首页</a>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
            <!--/#page-content-->
        </div>
        <div th:replace="common/skin :: skin"></div>
    </div><!--/#main-content-->
</div><!--/.fluid-container#main-container-->
<div th:replace="common/jsList"></div>
<script>
    function changePerson(id, name, yw, zpUrl, fupId) {
        $("#qyId").val(id);
        $("#fupId").val(fupId);
        $("#name").val(yw + (name === 'null' ? '' : '(' + name + ')'));
        if (zpUrl === "null") {
            $("#imgXf").attr('src', '/images/null.jpg');
        } else {
            $("#imgXf").attr('src', '/' + zpUrl);
        }
    }
</script>
</body>
</html>
